<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>大事件-登录与注册</title>
  <link rel="stylesheet" href="/assets/lib/layui/css/layui.css">
  <link rel="stylesheet" href="/assets/css/login.css">

</head>

<body>
  <!-- 头部 -->
  <header class="layui-main">
    <img src="/assets/images/logo.png" alt="">
  </header>
  <!-- 登录与注册 -->
  <div class="login-reg">
    <!-- 标题 -->
    <div class="login-title">
    </div>
    <!-- 登录 -->
    <div class="login-box">
      <form class="layui-form" action="" id="formLogin">
        <div class="layui-form-item">
          <i class="layui-icon layui-icon-username"></i>
          <input value="gx666" type="text" name="username" required lay-verify="required|username" placeholder="请输入用户名"
            autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item">
          <i class="layui-icon layui-icon-password"></i>
          <input value="gx0923" type="text" name="password" required lay-verify="required|password" placeholder="请输入密码"
            autocomplete="off" class="layui-input">
        </div>
        <!-- 按钮 -->
        <div class="layui-form-item">
          <button class="layui-btn layui-btn-primary layui-border-blue layui-btn-fluid" lay-submit
            lay-filter="formDemo">立即登录</button>
        </div>
        <!-- 链接 -->
        <div class="layui-form-item">
          <a href="javascript:;" style="font-size: 12px;">点击注册账号</a>
        </div>
      </form>
    </div>
    <!-- 注册 -->
    <div class="load-box" style="display: none;">
      <form class="layui-form" action="" id="formReg">
        <div class="layui-form-item">
          <i class="layui-icon layui-icon-username"></i>
          <!-- lay-verify 添加校验规则 -->
          <input type="text" name="username" required lay-verify="required|username" placeholder="请输入用户名"
            autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item">
          <i class="layui-icon layui-icon-password"></i>
          <input type="text" name="password" required lay-verify="required|password" placeholder="请输入密码"
            autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item">
          <i class="layui-icon layui-icon-password"></i>
          <!-- 确认密码的name属性一定不能和密码的name属性一样 -->
          <!-- 否则会导致后面axios没有反应 -->
          <input type="text" name="repassword" required lay-verify="required|repassword" placeholder="请再次输入密码"
            autocomplete="off" class="layui-input">
        </div>
        <!-- 按钮 -->
        <div class="layui-form-item">
          <button class="layui-btn layui-btn-primary layui-border-blue layui-btn-fluid" lay-submit
            lay-filter="formDemo">立即注册</button>
        </div>
        <div class="layui-form-item ">
          <a href="javascript:;" style="font-size: 12px;">已有账号?去登录</a>
        </div>
      </form>
    </div>
  </div>


  <!-- 导入axios -->
  <script src="/assets/lib/axios.js"></script>
  <!-- 导入设置的axios默认基础路径 -->
  <script src="/assets/js/common.js"></script>
  <script src="/assets/lib/layui/layui.all.js"></script>
  <script src="/assets/lib/jquery.js"></script>
  <script src="/assets/js/login.js"></script>
</body>

</html>